package javase.reflection.proxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class InvocationHandlerImpl implements InvocationHandler {
	private Action realImplementation;
	
	public InvocationHandlerImpl (Action action) {
		this.realImplementation = action;
	}
	
	@Override
	public Object invoke(Object proxy, Method method, Object[] args)
			throws Throwable {
		System.out.println("invoked proxy");
		return method.invoke(realImplementation, args);
	}

}
